public class 匿名对象 {
    public static void main(String[] args) {
        new NoNameDemo().method(new Student2());
    }
}

class Student2 {
    public void show() {
        System.out.println("我爱学习");
    }
}

class NoNameDemo {
    public void method(Student2 s) {
        s.show();
    }
}


